# coding: utf-8
# @Author: 健聪
# @Description: 
# @Date: 2024/10/13
import time

from dominate.tags import article
from flask import Flask, render_template

app = Flask(__name__)


@app.route('/')
def build_link():
    return render_template('link.html')


@app.route('/value')
@app.route('/valute/<string:username>')
def value(username=None):
    return render_template('value.html', username=username)


@app.route('/control')
@app.route('/control/<int:num>')
def control(num=0):
    # 此处使用 list 模拟文章列表
    articles = []
    for i in range(1, num + 1):
        articles.append({
            'title': '文章%d标题' % i,
            'content': ('文章%d的内容' % i) * i,
        })
    return render_template('control.html', num=num, articles=articles)

@app.route('/extends')
def extends():
    return render_template('extends.html')


@app.route('/include')
def include():
    return render_template('include.html')


if __name__ == '__main__':
    app.run()
